<template>
	<view style="width: 700rpx;margin:0 auto">
		<view style="display: flex;justify-content:space-between;align-items: center;margin:22rpx 0">
			<view style="display: flex;align-items: center;">
				<view style="height: 26rpx;width: 8rpx;background: #13989A;
border-radius: 4rpx;"></view>
				<view style="color:#1E272E;font-size: 32rpx;font-weight: 700;margin-left: 15rpx;">明星师傅</view>
			</view>

			<u-icon name="arrow-right" size="20" color='#BEBEBE'></u-icon>
		</view>
		<view v-for="(v,i) in starTechnicianList " :key="i" class="item">
			<u-image width="100rpx" height="100rpx" shape="circle" :src="'https://' + v.avatar" style=""></u-image>
			<view style="width: 530rpx;margin-left: 20rpx; ">
				<view style="display: flex;align-items: center;margin-bottom:20rpx;">
					<view style="font-weight: 700;font-size: 32rpx;min-width: 100rpx;">{{v.nickName}}</view>
					<view class="roleName" style="margin-left: 15rpx;">{{v.roleName}}</view>
					<view class="work">工作{{v.workYear}}年</view>
					<view class="age" style="margin-right: 10rpx;"> {{v.age}}岁</view>
					<u-icon name="arrow-right" size="18" color='#BEBEBE'></u-icon>
				</view>
				<view style="display: flex;justify-content: space-between;">
					<view style="display: flex;align-items: center;" v-if="loginType!=4">
						<view style="font-size: 26rpx;color:#454B4F;">评分:</view>
						 
						<view><u-rate activeColor='#F79E1B' readonly allowHalf :value="v.score"></u-rate></view>
					</view>
					<view style="display: flex; align-items: center;">
						<image style="width: 20rpx;height: 28rpx;margin-right:10rpx;" src="https://renovationcdn.jiachuangnet.com/count.png"></image>
					     <text>已为<text :style="{'color':color,'margin':'0rpx 10rpx','fontWeight':'blod'}">{{v.orderNum}}</text>家店铺服务</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	let app = getApp();
	import Decimal from 'decimal.js'
	export default {
		data() {
			return {
				starTechnicianList: [],
				color:app.globalData.defaultColor,
				loginType : uni.getStorageSync('loginType')
			}
		},
		mounted() {
			this.getStarTechnician();
		},
		methods: {
			//明星技工
			getStarTechnician() {
				uni.$u.http.get('/talent/getTalentList', {
					params: {
						pageSize: 5,
						pageNumber: 1
					}
				}).then(res => {
					 
					this.starTechnicianList = res;
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.item {
		background: #FFFFFF;
		width: 650rpx;
		margin-bottom:20rpx;
		padding:25rpx;
		border-radius: 20rpx;
		display:flex;
		align-items:center;
	}
	.roleName,.age,.work{
		background: #FFEEEB;
		border-radius: 20rpx 0rpx 20rpx 0rpx;
		color: #FF6D52;
		font-weight: 500;
		width: 122rpx;
		height: 40rpx;
		text-align: center;
		line-height: 40rpx;
	}
	.age{
		background: #FFF5EA;;
		color: #FCB136;
	}
	.work{
		background-color: #EAF4FE;
		color: #39A7F8;
		margin:0 10rpx;
	}
</style>